﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntitiesLayer
{
    public abstract class EntityObject
    {
        public int ID
        {
            get;
            set;
        }

        public EntityObject() { }

        public EntityObject(int id)
        {
            ID = id;
        }

        public override bool Equals(object obj)
        {
            return obj == null || !(obj is EntityObject) ? false : ID == (obj as EntityObject).ID;
        }


        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}
